<template>
  <b-container fluid>
    <b-row align-h="center">
      <b-col lg="11">
        <b-card-group deck>
          <b-row fluid no-gutters>
            <b-col v-for="news in newsList" :key="news.id" sm="6">
              <news-card
                :title="news.title"
                :desc="news.summary"
                :publish-ts="news.createtime"
                :img-src="`${imgDomain}${news.cover_image}`"
              />
            </b-col>
          </b-row>
        </b-card-group>
      </b-col>
    </b-row>
  </b-container>
</template>

<script>
import NewsCard from '@/components/NewsCard';

export default {
  components: {
    NewsCard,
  },
  props: {
    newsList: {
      type: Array,
      required: true,
    },
    imgDomain: {
      type: String,
      default: '',
    },
  },
};
</script>
